from sqlmodel import SQLModel, Field


class UserBase(SQLModel):
    username: str
    phone: str
    email: str


class User(UserBase, table=True):
    id: int | None = Field(default=None, primary_key=True)


class UserPublic(UserBase):
    id: int


class UserCreate(UserBase):
    pass


class UserUpdate(SQLModel):
    phone: str | None = None
    email: str | None = None
